import Vue from 'vue';
import VueRouter from 'vue-router';
import Index from '@/views/Index.vue';
import List from '@/views/List.vue';
import City from '@/views/City.vue';
import Search from '@/views/Search';
import Detail from '@/views/Detail';

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Index',
    component: Index
  },
  {
    path: '/list',
    name: 'List',
    component: List
  },
  {
    path: '/city',
    name: 'City',
    component: City
  },
  {
    path: '/search',
    name: 'Search',
    component: Search
  },
  {
    path: '/detail',
    name: 'Detail',
    component: Detail
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
